gaussian elimination of 3 by 3 matrices